{include file='public/header'}

<style>
    .layui-form-pane .layui-form-label {padding:8px 5px;}
    .layui-word-aux{font-size:16px;color: red}
    .layui-elem-field .legend-ext{font-size:14px;color: #FF5722;font-weight: normal}
    .inlegend{font-size: 14px;margin:5px 8px;color: #FF5722}
</style>
<!--主体-->
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title"><li class="layui-this">邀请用户管理</li></ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">

                <input type="hidden" name="auditState" value="-1">
                <fieldset class="layui-elem-field">
                    <legend>查办卡记录 </legend>
                    <div class="layui-row inlegend">客观原因系统是客户只要点击分销商二维码并填写了身份信息就会留下申请记录（这样会造成很多是无效记录实际未真实申请），这个情况大家要了解！有疑问的可以通过打客户电话或至银行官方网站查询是否真实申请！最后银行会给一份真实数据。</div>
                    <div class="layui-form-item">


                        <label class="layui-form-label">银行</label>
                        <div class="layui-input-inline" style="width:140px">
                            <select name="code" id="searchCardCode2">
                                <option value="">所有</option>
                                <option value="兴业银行">兴业银行</option>
                                <option value="交通银行">交通银行</option>
                                <option value="浦发银行">浦发银行</option>
                                <option value="上海银行">上海银行</option>
                                <option value="民生银行">民生银行</option>
                            </select>
                        </div>




                        <label class="layui-form-label">用户</label>
                        <div class="layui-input-inline">
                            <input type="text" name="keyword" value="" placeholder="姓名/手机号" id="name" class="layui-input">
                        </div>


                        <notempty name="arr5">
                            <label class="layui-form-label">所属分销商</label>
                            <div class="layui-input-inline" style="width:100px">
                                <select name="level" id="sltLevel1" lay-filter="agentLevel1">
                                    <option value="">所有级别</option>


                                </select>
                            </div>




                        <div class="layui-input-inline"><button class="layui-btn btn" onclick="chk()">搜索</button></div>
                    </div>
                </fieldset>
                <!--</form>-->

                <div class="layui-tab">
                    <ul class="layui-tab-title"><li class="layui-this"><a href="?code=all&1=1&/admin/User/index=">所有</a></li></ul>
                </div>
                <table class="layui-table">
                    <thead>
                    <tr>
                        <th style="width:50px;">ID</th>
                        <th>姓名</th>
                        <th>手机</th>
                        <th>身份证</th>
                        <th>登记时间</th>
                        <th>分销商</th>
                        <th>申请卡种</th>
                        <th>批核状态</th>
                        <th>批核日期</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody id="tb">



                    </tbody>
                </table>
                <!--分页-->
            </div>
        </div>
    </div>
</div>
</div>

<script>
    var chk =function () {

//bark
        var bark = $("#searchCardCode2").val();
        //分销商
        var f_user = $("#sltLevel1").val();
        //用户
        var name = $('#name').val();
        $.ajax({
            url:"./search",
            data:{b:bark,f:f_user,n:name},
            async:false,
            type:"post",
            success:function (msg) {
                if(msg.error == 0){
                    $('#tb').html("");
                    var str = "";
                    for(var i=0;i<msg.msg.length;i++){
                        if(msg.msg[i].Auditing == 0){
                            str +="<tr> \
                    <td class='nopadding'>"+msg.msg[i].id+"</td>\
                    <td>"+msg.msg[i].username+"</td>\
                    <td>"+msg.msg[i].phone+" </td>\
                    <td>"+msg.msg[i].card+" </td>\
                    <td>"+msg.msg[i].showtime+"</td>\
                    <td>"+msg.msg[i].dl_user+"</td>\
                    <td>"+msg.msg[i].bark_style+"</td>\
                    <td><span class='fgreen hand matchstate' style='color:red'>未通过</span></td>\
                    <td>"+msg.msg[i].auti_showtime+"</td>\
                <td><a href='{$url}/admin/Manage/edit_manage?id="+msg.msg[i].id+"'>编辑</a></td></tr>";
                        }else if(msg.msg[i].Auditing == 1){
                            str +="<tr> \
                    <td class='nopadding'>"+msg.msg[i].id+"</td>\
                    <td>"+msg.msg[i].username+"</td>\
                    <td>"+msg.msg[i].phone+" </td>\
                    <td>"+msg.msg[i].card+" </td>\
                    <td>"+msg.msg[i].showtime+"</td>\
                    <td>"+msg.msg[i].dl_user+"</td>\
                    <td>"+msg.msg[i].bark_style+"</td>\
                    <td><span class='fgreen hand matchstate' style='color:green'>已批核</span></td>\
                    <td>"+msg.msg[i].auti_showtime+"</td>\
                    <td><a href='{$url}/admin/Manage/edit_manage?id="+msg.msg[i].id+"'>编辑</a></td></tr>";
                        }
                    }
                    $('#tb').html(str);

                }else if(msg.error == 1){
                    window.location.href=msg.url;
                }

            }
        })





    }

</script>


</body>
</html>

